package game.leon.engine.script.exec;

/**
 * User: bianpeng
 * Date: 12-2-8
 */
abstract public class Var {
    public static interface Def {
        int LT_UNKNOWN = 0;
        int LT_INT = 1;
        int LT_STR = 2;
        int LT_SYM = 3;
        int LT_VAR = 4;
        int LT_KWD = 5; // keyword, is a int val , vm unique integer
        int LT_NIL = 6; // i hate nil, never used i wish
        int LT_VEC = 7; // vector, random access
        int LT_NUM = 8;
        int LT_LAMBDA = 9;
    }
    // type
    private int type;
    protected Var(int type) { this.type = type; }
    private Var() {}
    public static Var integer(int val) {
        return new IntVar(val);
    }
    public static Var number(double val) {
        return new NumVar(val);
    }
    public static Var string(String val) {
        return new StrVar(val);
    }
    public static Var symbol(String val) {
        return new SymVar(val);
    }
}
